//== SAGITTARIUS ============================================================================

//== FILEDOC =========================================================================

/** @file lDeriv.h
  * @brief Derivatives of regular expressions
  * @details
  * See @ref OwensPaper "Owens et al." for more information
  */

//== BEGINNING OF CODE ===============================================================

#ifndef __SAGUTTARUIS__LDERIV__H_
#define __SAGUTTARUIS__LDERIV__H_

//== INCLUDES ========================================================================

#include "sagittarius/core/SagittariusCore.h"
#include "sagittarius/lexer/lAST.h"
#include "sagittarius/lexer/lexvec.h"

#ifdef __cplusplus
extern "C" {
#endif

/** @brief Computes the derivative of a RE
 */
lASTNode* lex_computeDerivative(lASTNode* n, LXConstAlphaType c, int closure);

/** @brief Computes the derivative of a regular vector (@ref lexvec)
 * @param[in] v The operand (vector type)
 * @param[in] c The derivative will be computed with respect to this symbol
 */
lexvec* lex_computeDerivativeV(lexvec* v, LXConstAlphaType c);

#ifdef __cplusplus
}//extern "C"
#endif

#endif
